/**********************************************
Table D1: Wealth Increases Brexit Support (Survey Experiment)
***********************************************/

preserve
yougov

* Column 1

qui reg outcome treat   , r 
outreg2 using "$output/tabd1.doc",  replace  nocons  ctitle(" ")  dec(3)   
qui margins, at (treat = (0 1)) post
regsave using "$temp/fig6data", replace

* Column 2

qui reg outcome treat $cfexp  , r 
outreg2 using "$output/tabd1.doc",    nocons  ctitle(" ")  dec(3)    append tex

qui sum outcome if treat==0 & e(sample)==1
local Mean = r(mean)
qui reg
local percent = _b[treat]/`Mean'
restore
